Many computers and other types of processing systems require the use of multiple independent processors. For example, a conventional desktop or portable personal computer (PC) will often include both a host processor and a multifunction controller. A typical multifunction controller may include several independent controllers, such as a floppy disk controller, one or more serial port controllers, a parallel port controller, and a keyboard/mouse interface controller, as well as other components such as an embedded microprocessor, a single-port random access memory (RAM), a host processor interface and a real time clock (RTC). The embedded microprocessor directs the operation of one or more of the controllers, and may also provide power management and other functions for the system in which the multifunction controller is installed. A computer system with a host processor and a multifunction controller having an embedded microprocessor thus represents one example of a multiple independent processor system.
The multiple independent processors in such a system often need to access a shared memory device. For example, in the case of the multifunction controller previously described, both the host processor and the embedded microprocessor may need to access the single-port RAM. A problem arises in that the single-port. RAM has only a single processor interface, and therefore only one of the host or embedded processors can access the RAM at any given time. Conventional memory-sharing techniques attempt to solve this problem by allocating the single-port RAM to either the host processor or the embedded processor on a first-come, first-served basis rather than in accordance with any particular need-based protocol. Another approach may involve utilizing a dual-port RAM in place of the single-port RAM such that both processors have a separate interface into the RAM. However, these conventional approaches are inadequate in that neither processor is given exclusive and independent control of the RAM at any particular time. In addition, there is generally no automatic lock-out protection provided to ensure that one processor will not attempt to access the RAM while the other processor is using it.
As is apparent from the above, a need exists for improved memory-sharing techniques for use in multiple-processor systems. The improved techniques should provide a simple and efficient sharing mechanism which allows a particular processor to obtain exclusive control of the shared memory device for a particular period of time, and thereby minimizes the likelihood of interference with another system processor.